<template>
    <div style="
        position:fixed;
        left:0;
        top:0;
        width:100%;
        height:100%;
        background:rgba(10,12,32,0.8);
        z-index:998;" @click.stop="close()">
        <div :is="type"></div>
    </div>
</template>

<script>
    import inquire from './inquire'
    import searchMg from './searchMg'
    import bus from '@/eventBus/bus'

    export default {
        name: "Dialog",
        props: ['type'],
        data() {
            return {
                active: 1,
                view: inquire,
            }
        },
        methods: {
            select(val) {
                this.active = val.value
                this.type = val.view
            },
            close() {
                let obj = {
                    status: false,
                    type: 'inquire'
                }
                bus.$emit('dialogshow', obj)
            }
        },
        components: {
            inquire,
            searchMg
        }
    }
</script>

<style scoped>
    .tc {
        width: 820px;
        height: 497px;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        margin: auto;
        z-index: 999;
        /*overflow: hidden;*/
        background: url("../../assets/images/bg_big.png") no-repeat center;
    }

    .header {
        width: 283px;
        height: 76px;
        line-height: 76px;
        text-align: center;
        margin: -33px 0 0 286px;
        overflow: hidden;
        color: #ff9b00;
        font-family: '微软雅黑', 'Avenir', Helvetica, Arial, sans-serif;
        font-size: 1.4em;
        letter-spacing: 10px;
        background: url("../../assets/images/header.png") no-repeat center;
    }

    .list {
        float: left;
        width: 180px;
        height: 300px;
        margin-top: 65px;
        margin-left: 55px;
        /*border:1px solid red;*/
        /*box-sizing: border-box;*/
        overflow: hidden;
    }

    .list li {
        width: 150px;
        height: 47px;
        line-height: 47px;
        margin: 20px auto 0;
        /*border:1px solid red;*/
        /*box-sizing: border-box;*/
        text-align: center;
        font-family: '微软雅黑', 'Avenir', Helvetica, Arial, sans-serif;
        font-size: 1.05em;
        background: url("../../assets/images/butten.png") no-repeat center;
    }

    .active {
        color: #ff9b00 !important;
        background: url("../../assets/images/butten_choose.png") no-repeat center !important;
        width: 180px !important;
        height: 60px !important;
        line-height: 60px !important;
    }


</style>
